<template>
  <div class="page-header mb-6">
    <div class="flex justify-between items-center">
      <div>
        <h1 class="page-title text-2xl font-bold">{{ title }}</h1>
        <p v-if="subtitle" class="text-gray-500 mt-1">{{ subtitle }}</p>
      </div>
      <div class="flex gap-2">
        <slot name="actions"></slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'PageHeader',
  props: {
    title: {
      type: String,
      required: true
    },
    subtitle: {
      type: String,
      default: ''
    }
  }
}
</script>

<style scoped>
.page-title {
  position: relative;
  margin-bottom: 4px;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--el-color-primary);
  border-radius: 3px;
}
</style> 